
<%@ page import="com.macrosolution.exdebito.Customer" %>
<!DOCTYPE html>
<html>

<head>
	<meta name="layout" content="kickstart" />
	<g:set var="entityName" value="${message(code: 'customer.label', default: 'Customer')}" />
	<title><g:message code="default.index.label" args="[entityName]" /></title>
</head>

<body>

<section id="index-customer" class="first">

	<table class="table table-bordered margin-top-medium">
		<thead>
			<tr>
			
				<g:sortableColumn property="age" title="${message(code: 'customer.age.label', default: 'Age')}" />
			
				<th><g:message code="customer.abode.label" default="Abode" /></th>
			
				<g:sortableColumn property="born" title="${message(code: 'customer.born.label', default: 'Born')}" />
			
				<g:sortableColumn property="bornDistrict" title="${message(code: 'customer.bornDistrict.label', default: 'Born District')}" />
			
				<g:sortableColumn property="bornMunicipality" title="${message(code: 'customer.bornMunicipality.label', default: 'Born Municipality')}" />
			
				<g:sortableColumn property="cf_piva" title="${message(code: 'customer.cf_piva.label', default: 'Cfpiva')}" />
			
			</tr>
		</thead>
		<tbody>
		<g:each in="${customerInstanceList}" status="i" var="customerInstance">
			<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
			
				<td><g:link action="show" id="${customerInstance.id}">${fieldValue(bean: customerInstance, field: "age")}</g:link></td>
			
				<td>${fieldValue(bean: customerInstance, field: "abode")}</td>
			
				<td><g:formatDate date="${customerInstance.born}" /></td>
			
				<td>${fieldValue(bean: customerInstance, field: "bornDistrict")}</td>
			
				<td>${fieldValue(bean: customerInstance, field: "bornMunicipality")}</td>
			
				<td>${fieldValue(bean: customerInstance, field: "cf_piva")}</td>
			
			</tr>
		</g:each>
		</tbody>
	</table>
	<div>
		<bs:paginate total="${customerInstanceCount}" />
	</div>
</section>

</body>

</html>
